package com.hz.filesystem.service.impl;

import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;
import com.hz.filesystem.entity.HzCityEntity;
import com.hz.filesystem.web.UserInfo;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.hz.filesystem.dao.HzTeacherDao;
import com.hz.filesystem.entity.HzTeacherEntity;
import com.hz.filesystem.service.HzTeacherService;


@Service("hzTeacherService")
public class HzTeacherServiceImpl extends ServiceImpl<HzTeacherDao, HzTeacherEntity> implements HzTeacherService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HzTeacherEntity> page = this.page(
                new Query<HzTeacherEntity>().getPage(params),
                new QueryWrapper<HzTeacherEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public UserInfo getUserInfo(long userId) {
        UserInfo userInfo = this.baseMapper.getUserInfo(userId);
        return userInfo;
    }

}